<div class="bjui-pageHeader">
  <form id="pagerForm" data-toggle="ajaxsearch" action="{:U('outboundOrder')}" method="post">
    <div class="bjui-searchBar">
      <div class="bjui-searchBar">
        <label>搜索：</label>
        <div role="group" class="btn-group">
          <select name="key" data-toggle="selectpicker">
            <option value="">－关键字类型－</option>
            <option value="order_sn" <?php echo I("key")=="order_sn" ? "selected='true'" : "";?>>－网店订单号－</option>
            <option value="order_no" <?php echo I("key")=="order_no" ? "selected='true'" : "";?>>－商品货号－</option>
            <option value="user_name" <?php echo I("key")=="user_name" ? "selected='true'" : "";?>>－姓名－</option>
			<option value="mobile_phone" <?php echo I("key")=="mobile_phone" ? "selected='true'" : "";?>>－手机－</option>
            <option value="home_phone" <?php echo I("key")=="home_phone" ? "selected='true'" : "";?>>－电话－</option>
			<option value="address" <?php echo I("key")=="address" ? "selected='true'" : "";?>>－地址－</option>
            <option value="courie_number" <?php echo I("key")=="courie_number" ? "selected='true'" : "";?>>－快递单号－</option>
          </select>
          <input type="text" name="value" class="form-control" size="20" value="{:I('value')}">
        </div>
		
		<div role="group" class="btn-group">
			<select name="bank_id" data-toggle="selectpicker">
				<option value="">请选择网店</option>
				<?php foreach($bankList as $bank):?>
				<option value="{$bank.id}" <?php echo I("bank_id")==$bank['id'] ? "selected='true'" : "";?>>{$bank.name}</option>
				<?php endforeach;?>
			</select>
		</div>
		&nbsp;
		<label>出库时间：</label><input type="text" data-toggle='datepicker' value="{$start_time}" name="start_time" class="form-control" size="20"  data-rule="required" />-<input type="text" data-toggle='datepicker' value="{$end_time}" name="end_time" class="form-control" size="20"  data-rule="required"/>
		
        <button type="submit" class="btn-default" data-icon="search">查询</button>
          <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true)" data-icon="undo">清空查询</a> &nbsp; 
      </div>
    </div>
  </form>
</div>
<div class="bjui-pageContent tableContent">
  <table class="table table-bordered table-hover table-striped table-top">
    <thead>
      <tr>
        <!-- 选择   订单号    网店单号    商品数量  订单状态   提交时间      操作  -->
        <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
        <th data-order-field="order_no" align="center">出库单号</th>
        <th data-order-field="order_sn" align="center">系统订单号<br />网店单号</th>
        <th data-order-field="goods_number" align="center">商品金额<br/>商品数量</th>
        <th data-order-field="express_id" align="center">出库单状态</th>
		<th data-order-field="order_status" align="center">快递名称</th>
        <th data-order-field="status_time" align="center">发货时间</th>
        
      </tr>
    </thead>
    <tbody>
      <?php foreach($list as $arr):?>
      <tr>
        <td><input type="checkbox" name="ids" data-toggle="icheck" value="{$arr.order_id}"></td>
        <!-- 订单号 -->
        <td align="center"><a  data-toggle="navtab" data-options="{id:'Order{$arr['order_id']}', url:'{:U('ShippingManage/detailsShipping?orderId='.$arr['order_id'].'&isAfterSale=1'.'&navTabId=Order'.$arr['order_id'])}', reloadWarn:'已打开业务页面，确认将重新载入?', title:'{$arr.order_sn}-订单详细'}">{$arr.outbound_sn}</a><br/>({$arr.user_name})</td>
        <!-- 网店单号 -->
        <td align="center"><a  data-toggle="navtab" data-options="{id:'Order{$arr['order_id']}', url:'{:U('order/detailsOrder?orderId='.$arr['order_id'].'&isAfterSale=1'.'&navTabId=Order'.$arr['order_id'])}', reloadWarn:'已打开业务页面，确认将重新载入?', title:'{$arr.order_sn}-订单详细'}">{$arr.order_no}</a><br/>{$arr.order_sn}</td>
        <!-- 商品数量 -->
        <td align="center">{$arr.order_amount}<br/>{$arr.order_goods_number}</td>
        <!-- 订单状态 -->
        <td align="center">{$arr.order_status}</td>
		<!-- 快递名称 -->
        <td align="center">{$arr.express_name}</td>
        <!-- 提交时间 -->
        <td align="center">{:date('Y-m-d H:i:s', $arr['status_time'])}</td>
        
      </tr>
      <?php endforeach;?>
    </tbody>
  </table>
</div>
<div class="bjui-pageFooter">
  <div class="pages"> <span>每页&nbsp;</span>
    <div class="selectPagesize">
      <select data-toggle="selectpicker" data-toggle-change="changepagesize">
        <option value="{$pageSize}">{$pageSize}</option>
        <option value="{$pageSize*3}">{$pageSize*3}</option>
        <option value="{$pageSize*6}">{$pageSize*6}</option>
        <option value="{$pageSize*12}">{$pageSize*12}</option>
        <option value="{$pageSize*15}">{$pageSize*15}</option>
      </select>
    </div>
    <span>&nbsp;条，共 {$total} 条</span> </div>
  <div class="pagination-box" data-toggle="pagination" data-total="{$total}" data-page-size="{$pageSize}"
         data-page-current="{$pageCurrent}"></div>
</div>
<script>
    function checkbank(){
        var bankI = $(".in select[name=bank_id]").val();
        if(Number(bankI)>0){
            return true;
        }
        $(this).alertmsg('warn', "请选择银行商店");
        return false;
    }
</script>